import App from './App.vue'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import '@/static/css/global.css'
import uView from "uview-ui";
Vue.use(uView);
Vue.config.productionTip = false


App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)

	// 设置全局变量
	app.config.globalProperties.$globalData = {
		userID: '',
		username: '',
		address_ip: 'www.mooddiagnosis.top',
		role:'',
		get upload_url() {
			return `https://${this.address_ip}/file/upload/chunk`;
		},
		get history_url() {
			return `https://${this.address_ip}/result/list`;
		},
		get delete_url() {
			return `https://${this.address_ip}/result/delete`;
		},
		get request_url() {
			return `https://${this.address_ip}/user/openId`;
		},
		get chat_url() {
			return `wss://${this.address_ip}/chatWebSocket/${this.userID}`;
		}
	}

	return {
		app
	}
}
// #endif